//
//  NSString+DecimalNumberCalc.h
//  PlatformCommon
//
//  Created by KimmanYip on 2018/6/11.
//

/*
 * NSString的精确计算
 * 注意:相关参数一定要是数字
 */

#import <Foundation/Foundation.h>

@interface NSString(PLDecimalNumberCalc)

/** 加 */
- (NSString *)pl_stringByAdding:(NSString *)value;

/** 减 */
- (NSString *)pl_stringBySubtracting:(NSString *)value;

/** 乘 **/
- (NSString *)pl_stringByMultiplyingBy:(NSString *)value;

/** 除 */
- (NSString *)pl_stringByDividingBy:(NSString *)value;

/** 转换 */
+ (NSString *)pl_decimalNumberWithDouble:(double)conversionValue;

/** 比较大小 */
- (NSComparisonResult)pl_compareWith:(NSString *)value;

/** 四舍五入到2位小数 */
- (NSString *)pl_roundingWith2Scale;

@end
